package com.sys.tool;

/**
 * Created by IntelliJ IDEA.
 * User: mabo
 * Date: 2011-1-28
 * Time: 13:28:14
 * To change this template use File | Settings | File Templates.
 */
public class ImanhuaTest2 {


    public void getJpg() {

        StringTool st = new StringTool();
        HttpClientTool hct = new HttpClientTool();
        FileTool ft = new FileTool("D:\\gz\\25");
        String html = "";
        for (int i = 1; i < 100; i++) {
            String ss = "000";
            if (String.valueOf(i).length() == 1) {
                ss = "00" + i;
            }else if (String.valueOf(i).length() == 2) {
                ss = "0" + i;
            }else {
                ss = ""+i;
            }
            hct.setUrl("http://61.147.109.2:89/pictures/108/6358/DragonBall_25_"+ss+".jpg");
            hct.addHeader("Referer", "http://www.imanhua.com/comic/108/list_6358.html?p=" + i);
             ft.createFile(ss+".jpg", hct.getByteArray());
        }

    }

    public static void main(String[] args) {
        ImanhuaTest2 it = new ImanhuaTest2();
        it.getJpg();
    }
}